package com.yikome.delivery.repository;

import java.util.List;

import org.springframework.data.domain.Sort;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Repository;

import com.yikome.common.CommonRepository;
import com.yikome.delivery.entity.DeliveryDetails;

@Repository
public interface DeliveryDetailsRepository extends CommonRepository<DeliveryDetails, Long> {

	@Query("select t from DeliveryDetails t where t.yn = 1 and t.deliveryCode = :deliveryCode")
	List<DeliveryDetails> findDeliveryDetails(@Param("deliveryCode")String deliveryCode , Sort sort);

	@Query("select t from DeliveryDetails t where t.yn = 1 and t.deliveryCode = :deliveryCode")
	List<DeliveryDetails> findDeliveryDetails(@Param("deliveryCode")String deliveryCode);
}
